package com.smartx.app.activity;

import android.app.AlertDialog;
import android.app.Dialog;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.util.Pair;
import android.support.v4.view.ViewPager;
import android.view.View;
import android.widget.ProgressBar;

import com.smartx.app.R;
import com.smartx.app.adapter.TabPagerAdapter;
import com.smartx.app.fragment.ImportMnemonicFragment;
import com.smartx.app.fragment.ImportPrivateKeyFragment;

import java.util.ArrayList;
import java.util.List;

public class ImportWalletActivity extends BaseActivity implements View.OnClickListener {

    private static final int MNEMONIC_FORM_INDEX = 0;
    private static final int PRIVATE_KEY_FORM_INDEX = 1;
    private final List<Pair<String, Fragment>> pages = new ArrayList<>();

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_import_wallet);
        toolbar();

        pages.add(MNEMONIC_FORM_INDEX, new Pair<>(getString(R.string.tab_mnemonic), ImportMnemonicFragment.create()));
        pages.add(PRIVATE_KEY_FORM_INDEX, new Pair<>(getString(R.string.tab_private_key), ImportPrivateKeyFragment.create()));
        ViewPager viewPager = findViewById(R.id.view_pager);
        viewPager.setAdapter(new TabPagerAdapter(getSupportFragmentManager(), pages));
        TabLayout tabLayout = findViewById(R.id.tabLayout);
        tabLayout.setupWithViewPager(viewPager);
    }

    @Override
    protected void onResume() {
        super.onResume();
    }

    @Override
    protected void onPause() {
        super.onPause();
    }

    @Override
    public void onBackPressed() {
        super.onBackPressed();
        this.finish();
    }

    @Override
    public void onClick(View v) {

    }
}
